{% extends "@admin/index.twig" %}

{% if app.route.name == 'admin_page_add'  %}
        {% set action = 'Добавяне' %}
    {% else %}
        {% set action = 'Редактиране' %}
{% endif %}
    
{% set title = 'Страници: ' ~ action %}
    
{% block js %}
    {{ parent() }}
    <script src="{{ asset("js/tinymce/tinymce.min.js") }}"></script>
    <script src="{{ asset("js/tinymce/TinyMCE-config-init.js") }}"></script>
{% endblock js %}

{% block menu %}
    {{ widget('\\Admin\\Widgets\\Multilanguage')|raw }}
{% endblock menu %}

{% block content %}
    {% if message is defined %}
        <div class="alert {{ message.type }}">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            {{ message.text }}
        </div>
    {% endif %}
    <legend class='col-md-offset-1 col-md-10'>{{ action }}</legend>
    {{ form.render|raw }}
{% endblock content %}